# Copyright (c) 2018 Presto Labs Pte. Ltd.
# Author: jaewon

from coin.exchange.binance.ws.subscriber import BinanceSubscriber
from coin.strategy.mm.feed_builder import (BinanceSnapshotFlowBookBuilder,
                                           BinanceSnapshot1sFlowBookBuilder)
from coin.strategy.mm.base.feed import BaseFeedSubsystem
from coin.strategy.mm.subscription import SubscriptionRequest


class BinanceSnapshotFeedSubsystem(BaseFeedSubsystem):
  FeedSubReq = SubscriptionRequest('Spot', 'Binance', 'snapshot')
  FeedSubscriber = BinanceSubscriber
  FlowBookBuilder = BinanceSnapshotFlowBookBuilder


class BinanceSnapshot1sFeedSubsystem(BaseFeedSubsystem):
  FeedSubReq = SubscriptionRequest('Spot', 'Binance', 'snapshot_1s')
  FeedSubscriber = BinanceSubscriber
  FlowBookBuilder = BinanceSnapshot1sFlowBookBuilder
